package cn.lzm.config;

import cn.lizemin.constant.SerializerKeys;
import cn.lzm.fault.retry.RetryStrategyKeys;
import cn.lzm.fault.tolerant.TolerantStrategyKeys;
import cn.lzm.loadbalancer.LoadBalancerKeys;
import lombok.Data;

/**
 * @author lzm
 * @Date 2024/7/21
 * @description RPC框架配置
 */
@Data
public class RpcConfig {

    private String name = "lzm-rpc";

    private String version = "1.0.0";

    private String serverHost = "localhost";

    private Integer serverPort = 80;

    private boolean mock = false;

    /**
     * 序列化器
     */
    private String serializer = SerializerKeys.JDK;

    /**
     * 注册中心
     */
    private RegistryConfig registryConfig = new RegistryConfig();

    /**
     * 负载均衡器
     */
    private String loadBalancer = LoadBalancerKeys.ROUND_ROBIN;

    /**
     * 重试策略
     */
    private String retryStrategy = RetryStrategyKeys.NO;

    /**
     * 容错策略
     */
    private String tolerantStrategy = TolerantStrategyKeys.FAIL_SAFE;

}
